<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>ClassToView</title>
    </head>
    <body link="white">
        <style>
            .cols{
            vertical-align:top;
            }
        </style>  
        <f:view>
            <h:panelGrid columns="2" columnClasses="cols">
                <rich:panelMenu width="200px" mode="ajax">
                    <rich:panelMenuGroup expanded="true" label="Tabelas">
                        <rich:panelMenuItem reRender="form" label="OPs" action="#{formgen.createGrid}">
                            <a4j:actionparam value="form" assignTo="#{formgen.formName}"/>
                            <a4j:actionparam value="teste.dao.OpbDAO" assignTo="#{formgen.daoName}"/>
                            <a4j:actionparam value="4" assignTo="#{formgen.cols}"/>
                        </rich:panelMenuItem>
                        <rich:panelMenuItem reRender="form" label="Pedidos" action="#{formgen.createGrid}">
                            <a4j:actionparam value="form" assignTo="#{formgen.formName}"/>
                            <a4j:actionparam value="teste.dao.VendapedDAO" assignTo="#{formgen.daoName}"/>
                            <a4j:actionparam value="4" assignTo="#{formgen.cols}"/>
                        </rich:panelMenuItem>
                        <rich:panelMenuItem reRender="form" label="Estados" action="#{formgen.createGrid}">
                            <a4j:actionparam value="form" assignTo="#{formgen.formName}"/>
                            <a4j:actionparam value="teste.dao.EstadoDAO" assignTo="#{formgen.daoName}"/>
                        </rich:panelMenuItem>
                        <rich:panelMenuItem reRender="form" label="Caixas" action="#{formgen.createGrid}">
                            <a4j:actionparam value="form" assignTo="#{formgen.formName}"/>
                            <a4j:actionparam value="teste.dao.CaixoteDAO" assignTo="#{formgen.daoName}"/>
                        </rich:panelMenuItem>
                        <rich:panelMenuItem reRender="form" label="Balancas" action="#{formgen.createGrid}">
                            <a4j:actionparam value="form" assignTo="#{formgen.formName}"/>
                            <a4j:actionparam value="4" assignTo="#{formgen.cols}"/>
                            <a4j:actionparam value="teste.dao.FmtbalancaDAO" assignTo="#{formgen.daoName}"/>
                        </rich:panelMenuItem>
                        <rich:panelMenuItem reRender="form" label="Unidades" action="#{formgen.createGrid}">
                            <a4j:actionparam value="form" assignTo="#{formgen.formName}"/>
                            <a4j:actionparam value="teste.dao.UnimedDAO" assignTo="#{formgen.daoName}"/>
                        </rich:panelMenuItem>
                    </rich:panelMenuGroup>   
                    <rich:panelMenuGroup expanded="true" label="Formulários">
                        <rich:panelMenuItem reRender="form" label="Estados" action="#{formgen.createForm}">
                            <a4j:actionparam value="form" assignTo="#{formgen.formName}"/>
                            <a4j:actionparam value="teste.dao.EstadoDAO" assignTo="#{formgen.daoName}"/>
                        </rich:panelMenuItem>
                        <rich:panelMenuItem reRender="form" label="Caixas" action="#{formgen.createForm}">
                            <a4j:actionparam value="form" assignTo="#{formgen.formName}"/>
                            <a4j:actionparam value="teste.dao.CaixoteDAO" assignTo="#{formgen.daoName}"/>
                        </rich:panelMenuItem>
                        <rich:panelMenuItem reRender="form" label="Balancas" action="#{formgen.createForm}">
                            <a4j:actionparam value="form" assignTo="#{formgen.formName}"/>
                            <a4j:actionparam value="4" assignTo="#{formgen.cols}"/>
                            <a4j:actionparam value="teste.dao.FmtbalancaDAO" assignTo="#{formgen.daoName}"/>
                        </rich:panelMenuItem>
                        <rich:panelMenuItem reRender="form" label="Unidades" action="#{formgen.createForm}">
                            <a4j:actionparam value="form" assignTo="#{formgen.formName}"/>
                            <a4j:actionparam value="teste.dao.UnimedDAO" assignTo="#{formgen.daoName}"/>
                        </rich:panelMenuItem>
                    </rich:panelMenuGroup>   
                </rich:panelMenu>
                <h:form id="form">
                </h:form>   
            </h:panelGrid>
        </f:view>
    </body>
</html>

